﻿//add to master page via a scriptlink control
function ShowAcknowDialog() {
    var options = SP.UI.$create_DialogOptions();
    var fullurl = window.location.href;  // entire url including querystring
    var baseURL = fullurl.substring(0, fullurl.indexOf('/', 14));
    options.url = baseURL + '/Pages/Acknowledge.aspx';
    options.height = 800;
    options.width = 800;
    options.title = "Acknowledgement";
    options.showClose = false;
    options.dialogReturnValueCallback = Function.createDelegate(null, ACCloseCallback);
    SP.UI.ModalDialog.showModalDialog(options);
}

function ACCloseCallback(result, value) {
    if (result == SP.UI.DialogResult.OK) {
        //Get id 
        messageId = SP.UI.Notify.addNotification("Policy Acknowledged...", false, "", null);
    }
}